Skip to content

fix: add reaction display to inline review comments on diff tab#346

Open
AbhiVarde wants to merge 2 commits intobetter-auth:mainfrom
AbhiVarde:fix/reactions-on-diff-tab
Open

fix: add reaction display to inline review comments on diff tab#346
AbhiVarde wants to merge 2 commits intobetter-auth:mainfrom
AbhiVarde:fix/reactions-on-diff-tab

Conversation

@AbhiVarde
Copy link
Copy Markdown
Contributor

@AbhiVarde AbhiVarde commented Apr 19, 2026

Fixes #345
Also fixes #347

Reactions were working on the Conversation tab but not on the Code (diff) tab.
The Code tab renders inline review comments inside SingleFileDiffInlineCommentDisplay in pr-diff-viewer.tsx, but had no reaction UI wired up.

Changes in apps/web/src/components/pr/pr-diff-viewer.tsx:

  • Imported ReactionDisplay and Reactions type from @/components/shared/reaction-display
  • Added reactions field to the ReviewComment interface
  • Rendered <ReactionDisplay> below each inline comment body, using contentType="pullRequestReviewComment"

Changes in apps/web/src/components/shared/reaction-display.tsx:

  • Deduplicated users in getUsersForReaction to prevent duplicate avatars and React key warnings
  • Added duplicate guard in optimistic update when adding a reaction

Screenshots

Before

After

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 19, 2026

@AbhiVarde is attempting to deploy a commit to the better-auth Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: duplicate reaction avatars and keys when toggling reactions Can't react to comments on a PR on the "code" tab

1 participant